package cn.mybatis.entity;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author zhang peng yang ming
 * @create 2018-07-30 22:16
 */
@Component
public class ExampleBean {
    public ExampleBean() {
        System.out.println("实例化ExampleBean");
    }

    @PostConstruct
    public void init() {
        System.out.println("init method 被调用");
    }

    @PreDestroy
    public void destroy() {
        System.out.println("destroy method 被调用");
    }
}
